package com.ddxz.tool.sql.parse.struct;

import lombok.Data;

/**
 * @description: 
 * @author: 朱宗刚
 * @date: 2019年12月3日
 * @version: 1.0.0
 */

@Data
public class ColumnInfo {
    private Boolean select;
    
    private Boolean condition;
    
    private Boolean order;

    private Boolean constant;
    
    private String enName;
    
    private String owner;
    
    private String alias;
    
    public ColumnInfo(int position) {
        constant = false;
        switch(position) {
        case SELECT:
            select = true;
            condition = false;
            order = false;
            break;
        case CONDITION:
            select = false;
            condition = true;
            order = false;
            break;
        case ORDER:
            select = false;
            condition = false;
            order = true;
            break;
        default:
            select = false;
            condition = false;
            order = false;
            break;
        }
    }

    public static final int SELECT = 1;
    public static final int CONDITION = 2;
    public static final int ORDER = 3;
}
